home *** CD-ROM | disk | FTP | other *** search
/ The Ultimate Guide to Advanture Travel / The Ultimate Guide to Advanture Travel.iso / pc / installa.6 / Online Files / AOLnet < prev    next >
Text File  |  1995-07-10  |  15KB  |  528 lines

  1. !*****************************************************************************
  2. !   C O P Y R I G H T   A N D   C O N F I D E N T I A L I T Y   N O T I C E
  3. !*****************************************************************************
  4. !
  5. !      Copyright © 1987-1995 America Online, Inc.  All rights reserved.
  6. !      This software contains valuable confidential and proprietary
  7. !      information of America Online, Inc. and is subject to applicable
  8. !      licensing agreements.  Unauthorized reproduction, transmission or
  9. !      distribution of this file and its contents is a violation of
  10. !      applicable laws.
  11. !
  12. !            A M E R I C A   O N L I N E   C O N F I D E N T I A L
  13. !
  14. !*****************************************************************************
  15.  
  16. ! ---------------------------------------------
  17. !   AOLnet CCL for AO v2.1 and above
  18. !   By: Matt Day
  19. !-----------------------------------
  20. !
  21. ! Connect Sequence:
  22. !
  23. -LABEL 0
  24. CanBtn 19               { if cancel button - just exit }
  25. Jsr "CheckPhoneLength"
  26. NewString sNetworkSync
  27. NewLngInt bHighSpeed
  28. SetVar bHighSpeed 0
  29. NewLngInt bSerSpeed
  30. SetVar bSerSpeed ~BAUD
  31. CheckPort "19" ~PORT
  32. DsplyMsg "Step 1:  Initializing modem"
  33. SetTries 0
  34. ChrDelay 2
  35. SerReset ~BAUD 0 8 1
  36.  
  37. IfEq Handshake 0
  38.  Jump "TurnHandshakeOff"
  39.  
  40. -Label TurnHandshakeOn 
  41. IfEq HH_ON ""
  42.  Jump "TurnHandshakeOff"
  43.  
  44. HSReset 0 1 17 19
  45. Jump "WakeUpModem"
  46.  
  47. -Label TurnHandshakeOff 
  48. HSReset 0 0 17 19
  49.  
  50. -Label WakeUpModem
  51. DsplyPic 1
  52. !
  53. !----------------------------------
  54. !
  55. -LABEL 1                { wake up the modem }
  56. Flush
  57. !-----------------------------------                        
  58. ZMIT "2" "$INIT$\0D"         { Send modem string; jump to 4 if empty}
  59. Pause 40            { Allow modem to settle between commands.}
  60. !
  61. -Label 2
  62. !
  63. ! *No longer allow +++ echoed as proof of initialization.*
  64. IfTries 0 "3"             { Only do this if we need to }
  65. ClrMchStr
  66. MatchStr "3" "OK"         
  67. MatchStr "3" ">"          { Special case for Avatex 1200 modems}
  68. MatchStr "3" "0\0D"      { Verbose is grandiose but terse ain't worse }
  69. !
  70. Pause 180               { Pause for 3 sec min gap }
  71. Xmit "+++"              { Get the modems attention}
  72. Pause 180               { Pause for 3 sec min gap }
  73. Xmit "$ATTENTION$H\0D"            {Hang up, just in case we were online}
  74. Wait 120                { Pause for 2 seconds, minimum gap required}
  75. !
  76. -Label 3 
  77. !-----------------------------------
  78. -LABEL 4                { just saw 'OK'- Set up modem }
  79. Flush
  80. !
  81. ClrMchStr
  82. MatchStr "5" "OK"         { We'd better be getting responses by now. }
  83. MatchStr "38" "ERROR"     { If not, something is wrong - we're gone. }
  84. MatchStr "5" ">"          {Special case for Avatex 1200}
  85. !
  86. Pause 40            { Allow modem to settle between commands.}
  87. IfEq Handshake 0
  88.   ZMIT "5" "$ATTENTION$$HH_OFF$$CONFIG$\0D"  { Send modem string; jump if empty}
  89. Else
  90.   ZMIT "5" "$ATTENTION$$HH_ON$$CONFIG$\0D"  { Send modem string; jump if empty}
  91. Wait 120                { Two seconds to get it right. }
  92. IncTries
  93. IfTries 1 "1"             { Try 1: Reset modem.  Try 2: Hang up/reset }
  94. Jump "33"
  95. !-----------------------------------
  96. -LABEL 5                { Now try to dial }
  97. DsplyMsg "Step 2:  Dialing ~PREF~NOCW~FONE"
  98. !
  99. ClrMchStr
  100. MatchStr "Got57600" "CONNECT 57600"
  101. MatchStr "Got38400" "CONNECT 38400"
  102. MatchStr "Got28800" "CONNECT 28800"
  103. MatchStr "Got26400" "CONNECT 26400"
  104. MatchStr "Got24000" "CONNECT 24000"
  105. MatchStr "Got21600" "CONNECT 21600"
  106. MatchStr "Got19200" "CONNECT 19200"
  107. MatchStr "Got16800" "CONNECT 16800"
  108. MatchStr "Got14400" "CONNECT 14400"
  109. MatchStr "Got12000" "CONNECT 12000"
  110. MatchStr "Got9600" "CONNECT 9600"
  111. MatchStr "Got7200" "CONNECT 7200"    
  112. MatchStr "Got4800" "CONNECT 4800"    
  113. MatchStr "Got2400" "CONNECT 2400\0D"    
  114. MatchStr "Got2400" "CONNECT 2400 "    
  115. MatchStr "Got2400" "CONNECT 2400/"    
  116. MatchStr "Got1200" "CONNECT 1200\0D"
  117. MatchStr "Got1200" "CONNECT 1200 "
  118. MatchStr "Got1200" "CONNECT 1200/"
  119. MatchStr "Got300" "CONNECT 300"
  120. MatchStr "Got300" "CONNECT\0D"     {assume "CONNECT" means the current baud rate}
  121. MatchStr "27" "NO ANSWER"      
  122. MatchStr "40" "NO DIAL"          
  123. MatchStr "41" "VOICE"           
  124. MatchStr "42" "NO CARRIER"     
  125. MatchStr "26" "BUSY"
  126. MatchStr "38" "ERROR"
  127. !
  128. CanBtn 18               { if cancel button hit, hangUp then exit }
  129. Pause 30
  130. Xmit "$ATTENTION$D~TONE~PREF~NOCW~FONE\0D"
  131. !                       { jump to label #13 if match }
  132. Wait 3600               { wait 40 seconds for CONNECT msg from modem }
  133. IFTRIES 1 "1"             {If we can't connect, try resetting the modem}
  134. !
  135. !
  136. ! This CCL section formerly checked for "300" through "9600" for
  137. ! no apparent reason - we do not support MNP connections and we'd
  138. ! never see that response string at this point anyway.
  139. !
  140. Jump "43"                 { else hang up phone & exit  }
  141. !
  142. !-----------------------------------
  143. !
  144. -Label Got300
  145. DsplyMsg "Step 3:  Connecting at 300 bps"
  146. SetSpeed 300
  147. IfEq Handshake 0
  148.  SetVar bSerSpeed 300
  149. Jump "MayReset"
  150. !
  151. -Label Got1200
  152. DsplyMsg "Step 3:  Connecting at 1200 bps"
  153. SetSpeed 1200
  154. IfEq Handshake 0
  155.  SetVar bSerSpeed 1200
  156. Jump "MayReset"
  157. !
  158. -Label Got2400
  159. DsplyMsg "Step 3:  Connecting at 2400 bps"
  160. SetSpeed 2400
  161. IfEq Handshake 0
  162.  SetVar bSerSpeed 2400
  163. Jump "MayReset"
  164. !
  165. -Label Got4800
  166. DsplyMsg "Step 3:  Connecting at 4800 bps"
  167. SetSpeed 4800
  168. IfEq Handshake 0
  169.  SetVar bSerSpeed 4800
  170. Jump "MayReset"
  171. !
  172. -Label Got7200
  173. DsplyMsg "Step 3:  Connecting at 7200 bps"
  174. SetSpeed 7200
  175. IfEq Handshake 0
  176.  SetVar bSerSpeed 7200
  177. Jump "MayReset"
  178. !
  179. -Label Got9600
  180. DsplyMsg "Step 3:  Connecting at 9600 bps"
  181. SetSpeed 9600
  182. IfEq Handshake 0
  183.  SetVar bSerSpeed 9600
  184. Jump "MayReset"
  185. !
  186. -Label Got12000
  187. DsplyMsg "Step 3:  Connecting at 12000 bps"
  188. SetSpeed 12000
  189. Jump "NoReset"
  190. !
  191. -Label Got14400
  192. DsplyMsg "Step 3:  Connecting at 14400 bps"
  193. SetSpeed 14400
  194. Jump "NoReset"
  195. !
  196. -Label Got16800
  197. DsplyMsg "Step 3:  Connecting at 16800 bps"
  198. SetSpeed 16800
  199. Jump "NoReset"
  200. !
  201. -Label Got19200
  202. DsplyMsg "Step 3:  Connecting at 19200 bps"
  203. SetSpeed 19200
  204. Jump "NoReset"
  205. !
  206. -Label Got21600
  207. DsplyMsg "Step 3:  Connecting at 21600 bps"
  208. SetSpeed 21600
  209. Jump "NoReset"
  210. !
  211. -Label Got24000
  212. DsplyMsg "Step 3:  Connecting at 24000 bps"
  213. SetSpeed 24000
  214. Jump "NoReset"
  215. !
  216. -Label Got26400
  217. DsplyMsg "Step 3:  Connecting at 26400 bps"
  218. SetSpeed 26400
  219. Jump "NoReset"
  220. !
  221. -Label Got28800
  222. DsplyMsg "Step 3:  Connecting at 28800 bps"
  223. SetSpeed 28800
  224. Jump "NoReset"
  225. !
  226. -Label Got38400
  227. DsplyMsg "Step 3:  Connecting at 38400 bps"
  228. SetSpeed 38400
  229. Jump "NoReset"
  230. !
  231. -Label Got57600
  232. DsplyMsg "Step 3:  Connecting at 57600 bps"
  233. SetSpeed 57600
  234. Jump "NoReset"
  235. !
  236. !-----------------------------------
  237. !
  238. -Label MayReset
  239. IfEq Handshake 1
  240.  Jump "12"
  241. Pause 180
  242. Xmit "+++"                                                                { Go to command state }
  243. Pause 180
  244. SerReset bSerSpeed 0 8 1
  245. Wait 60
  246. MatchStr "12" "CONNECT"
  247. MatchStr "45" "NO CARRIER"     
  248. Xmit "$ATTENTION$O\0D"                { Go back to online state }
  249. Wait 60
  250. Jump "12"
  251. !
  252. -Label NoReset
  253. IfEq Handshake 0
  254.  Jump "44"
  255. !
  256. -LABEL 12               { Modem just sent 'CONNECT' message }
  257. Pause 20
  258. ChrDelay 20      
  259. DsplyPic 2
  260. !        
  261. -LABEL 13               {  Establishing Connection }
  262. Pause 30
  263. !
  264. ClrMchStr
  265. MatchStr "ANSTry" "UQKT1"
  266. MatchStr "SprintTry" "UQKT2"
  267. MatchStr "ANSTry" "ANSNet"
  268. MatchStr "UUNetTry" "UU.NET"
  269. MatchStr "UUNetTry" "SATURN.BBN"
  270. MatchStr "SprintTry" "SPRINT-IP"
  271. MatchStr "45" "NO CARRIER"     
  272. !
  273. Wait 4800                {Try to sync up to four times}
  274. DsplyMsg "Timed Out..."
  275. Jump "ConnectFailure"
  276. !
  277. !-------------------------------
  278. !
  279. -LABEL ANSTry               { = for term ID}
  280. !                         Sending Terminal Identifier
  281. !
  282. ChrDelay 2
  283. Pause 20
  284. DsplyMsg "Step 4: Requesting network attention"
  285. Xmit "aol\0D"
  286. DsplyMsg "Step 5: Talking to network"
  287. !
  288. Jump "CheckConnected"
  289. !
  290. -Label UUNetTry
  291. DsplyMsg "Step 4:  Requesting network attention"
  292. ClrMchStr
  293. MatchStr "SendUUNetPassword" "Password"
  294. MatchStr "45" "NO CARRIER"     
  295. Xmit "aolnet\0D"
  296. Wait 2000
  297. jump ConnectFailure
  298. !
  299. -Label SendUUNetPassword
  300. DsplyMsg "Step 5: Talking to network"
  301. Xmit "A0L2aNet\0D"
  302. Jump "CheckConnected"
  303. !
  304. -Label SprintTry
  305. DsplyMsg "Step 4:  Requesting network attention"
  306. ClrMchStr
  307. MatchStr "SendSprintPassword" "Password"
  308. MatchStr "45" "NO CARRIER"     
  309. Xmit "aol\0D"
  310. Wait 2000
  311. jump ConnectFailure
  312. !
  313. -Label SendSprintPassword
  314. DsplyMsg "Step 5: Talking to network"
  315. Xmit "aol\0D"
  316. Jump "CheckConnected"
  317.  
  318. !
  319. -Label CheckConnected
  320. DsplyMsg "Step 6: Connecting to America Online"
  321. ClrMchStr
  322. MatchStr "ConnectSuccess" "CONNECTED"
  323. MatchStr "ConnectSuccess" "OPEN"
  324. MatchStr "ConnectFailure" "UNAVAILABLE"
  325. MatchStr "ConnectFailure" "CONNECT FAILED"
  326. MatchStr "ConnectFailure" "NOT AVAILABLE"
  327. MatchStr "ConnectFailure" "UNREACHABLE"
  328. MatchStr "ConnectFailure" "NO CONNECTION"
  329. MatchStr "SyncFailure" "BAD PASSWORD"
  330. MatchStr "SyncFailure" "LOGIN INVALID"
  331. Wait 2700
  332. jump "ConnectFailure"
  333. !
  334. -Label ConnectSuccess
  335. DsplyMsg "Step 7: Checking Password"
  336. Exit 0
  337. !
  338. !-----------------------------------
  339. !
  340. -Label 18               { User aborted sequence }
  341. Exit -51
  342. !
  343. -Label 19               { User aborted sequence...dont need to hang up though}
  344. Exit -111
  345. !
  346. !-----------------------------------
  347. !
  348. -Label 26              {Busy phone}
  349.  
  350. IfEq ~ATMP 0
  351. DsplyMsg "The number dialed is busy. Trying second number."
  352. Talert "The number dialed is busy.  Please try again later.\0D\0DTo find another local access number, select Get Local # from the Locality pop-up menu, and click on Sign On."
  353. IfEq ~ATMP 1
  354. OneAlert 1 "\0D\0DFor more information, select Help from the Apple menu."
  355. Exit -1
  356. !
  357. !-----------------------------------
  358. !
  359. !
  360. !
  361. -Label 27              {No Answer}
  362.  
  363. IfEq ~ATMP 0
  364. DsplyMsg "The number dialed is not answering. Trying second number."
  365. TAlert "The number dialed is not answering.  Please try again later.\0D\0DTo find another local access number, select Get Local # from the Locality pop-up menu, and click on Sign On."
  366. IfEq ~ATMP 1
  367. OneAlert 1 "\0D\0DFor more information, select Help from the Apple menu."
  368. Exit -1
  369. !
  370. !---------------------------------------------
  371. !
  372. -Label 28
  373.  
  374. Talert "The access company failed to respond.  Please try again later.\0D\0DTo find another local access number, select Get Local # from the Locality pop-up menu, and click on Sign On."
  375. IfEq ~ATMP 1
  376. OneAlert 1 "\0D\0DFor more information, select Help from the Apple menu."
  377. Exit -1
  378. !
  379. !-----------------------------------
  380. !
  381. -Label ConnectFailure              {not_avail}
  382.  
  383. TAlert "The final connection step to ~APPL did not complete.  Please try again later."
  384. Jump "36"
  385. !
  386. !-----------------------------------
  387. !
  388. -Label SyncFailure                     {CCL Sync problem}
  389.  
  390. TAlert "An error has occured while attempting to connect to America Online.\0D\Normally, trying again will resolve this problem."
  391. Jump "36"
  392. !
  393. !-----------------------------------
  394. !
  395. -Label 33              {no response from modem}
  396.  
  397. TAlert "~APPL was unable to initialize your modem.\0D\0D1. Turn your modem off, then back on.\0D2. Check your modem cable connections.\0D"
  398. IfEq ~ATMP 1
  399. OneAlert 1 "3  Click on Setup, and verify your modem type selection.\0D\0DFor more information, select Help from the Apple menu."
  400. Exit -1
  401. !
  402. !-----------------------------------
  403. -Label 35
  404. Exit -1
  405. !
  406. -Label 36
  407. IfEq ~ATMP 1
  408. OneAlert 1 "\0D\0DFor more information, select Help from the Apple menu."
  409. Exit -1
  410. !-----------------------------------
  411. ! Some new error messages since error #1 is getting kind of meaningless.
  412. -Label 37          { Time-Out }
  413. TAlert "It has taken too long to process your connection.\0D\0D1. Test your modem with another communications program.\0D2. Verify the local access number by selecting Get Local # "
  414. IfEq ~ATMP 1
  415. OneAlert 1 "from the Locality pop-up menu, then clicking on Sign On.\0D\0DFor more information, select Help from the Apple menu."
  416. Exit -1
  417. -Label 38          {Modem command error}
  418. TAlert "Your modem is not accepting our commands.\0D\0D1. Turn your modem off, then back on.\0D2. Click on Setup, and verify your modem type selection."
  419. Jump "36"
  420. !
  421. -Label 40
  422.  
  423. TAlert "The modem has reported no dial tone.\0D1. Check the phone line connections.\0D2. Make sure the line from the wall is connected to the jack labeled Line, Telco, Wall, or Jack.\0D"
  424. IfEq ~ATMP 1
  425. OneAlert 1 "3. Use a telephone to check for a dial tone.\0D\0DFor more information, select Help from the Apple menu."
  426. Exit -1
  427. !
  428. -Label 41
  429.  
  430. TAlert "The number dialed did not connect to the access company.\0D\0D1. Verify your setup information by clicking on Setup.\0D2. Verify the local access number by selecting Get Local # "
  431. IfEq ~ATMP 1
  432. OneAlert 1 "from the Locality pop-up menu, then clicking on Sign On.\0D\0DFor more information, select Help from the Apple menu."
  433. Exit -1
  434. !
  435. -Label 42
  436.  
  437. TAlert "The modem was unable to get a carrier signal.\0D\0D1. Verify your setup information by clicking on Setup.\0D2. Verify the local access number by selecting Get Local # "
  438. IfEq ~ATMP 1
  439. OneAlert 1 "from the Locality pop-up menu, then clicking on Sign On.\0D\0DFor more information, select Help from the Apple menu."
  440. Exit -1
  441. !
  442. -Label 43
  443.  
  444. TAlert "The modem detected a timeout.\0D\0D1. Test your modem with another communications program.\0D2. Verify the local access number by selecting Get Local # "
  445. IfEq ~ATMP 1
  446. OneAlert 1 "from the Locality pop-up menu, then clicking on Sign On.\0D\0DFor more information, select Help from the Apple menu."
  447. Exit -1
  448. !
  449. -Label 44
  450. OneAlert 1 "Connection speeds above 9600 bps require the use of Hardware Handshaking."
  451. Exit -1
  452. !
  453. -Label 45
  454. OneAlert 1 "The modem has lost carrier signal.  Please try signing on again."
  455. Exit -1
  456. !
  457. !------------------------------------
  458. -Label CheckPhoneLength
  459. !
  460. NewString sPhoneNumber
  461. SetVar sPhoneNumber ~FONE
  462. NewLngInt lCount
  463. SetVar lCount 6
  464. !
  465. -Label TopPhoneLoop
  466. IfEq lCount 0
  467. Jump "FinishPhoneLength"
  468. DecVar sPhoneNumber
  469. DecVar lCount
  470. Jump "TopPhoneLoop"
  471. !
  472. -Label FinishPhoneLength
  473. IfEq sPhoneNumber ""
  474. Jump "EmptyPhone"
  475. Return
  476. !
  477. -Label EmptyPhone
  478. OneAlert 1 "You must enter phone numbers before signing on.\0D\0DSelect ""Setup"" and verify the phone numbers you have entered."
  479. Exit -111
  480. !------------------------------------
  481. !
  482. *-Label 0                {Hangup Sequence}
  483. *CanBtn 2
  484. !
  485. *Flush
  486. !
  487. *SetTries 0            {DMC: see if we can get the modem's attention}
  488. *ClrMchStr
  489. *MatchStr "1" "OK"         { Dont look for an echo, may be a}
  490. *MatchStr "1" "NO"         { false echo.  Any type of match is good}
  491. *MatchStr "1" ">"          { Special case for Avatex 1200 modems}
  492. !
  493. *Pause 180               { Pause for 3 sec min gap }
  494. *Xmit "+++"              { Get the modems attention}
  495. *Pause 180               { Pause for 3 sec min gap }
  496. *IfTries 0 "1"
  497. !
  498. *ClrMchStr
  499. *MatchStr "1" "OK"
  500. *MatchStr "2" "CARRIER"    {Any type of match is good}
  501. *MatchStr "1" ">"         { Special case for Avatex 1200 modems}
  502. !
  503. *Pause 180               { Pause for 3 sec min gap }
  504. *Xmit "+++"              { Get the modems attention}
  505. *Pause 180               { Pause for 3 sec min gap }
  506. !
  507. *-Label 1
  508. *IncTries
  509. *ClrMchStr
  510. *MatchStr "2" "ERROR"
  511. *MatchStr "2" "OK"
  512. *MatchStr "2" "CARRIER"
  513. *MatchStr "2" ">"          { Special case for Avatex 1200 modems}
  514. !
  515. *Pause 40
  516. *Xmit "$ATTENTION$H\0D"
  517. *Wait 300
  518. !
  519. *-Label 2
  520. *Pause 40                { Allow modem to settle between commands.}
  521. *ZMIT "3" "$ATTENTION$$REST$\0D"         { Send shutdown string}
  522. !
  523. *-Label 3
  524. *Exit 0
  525. !
  526. ###
  527.